package com.ruoyi.merchant.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 银行卡状态枚举
 */
@Getter
@AllArgsConstructor
public enum BankCardStatusEnum {
    
    DISABLED(0, "禁用"),
    ENABLED(1, "启用"),
    FROZEN(2, "冻结");
    
    private final Integer code;
    private final String desc;
    
    public static String getDescByCode(Integer code) {
        if (code == null) {
            return "";
        }
        for (BankCardStatusEnum status : values()) {
            if (status.getCode().equals(code)) {
                return status.getDesc();
            }
        }
        return "";
    }
}
